<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <link rel="shortcut icon" href="#" type="image/png">

    <title>Form Layouts</title>

    <link href="css/style.css" rel="stylesheet">
    <link href="css/style-responsive.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
</head>

<body class="sticky-header">

<section>
    <!-- left side start-->
    <div class="left-side sticky-left-side">

        <!--logo and iconic logo start-->
        <div class="logo">
            <a href="backPage.html"><img src="images/logo.png" alt=""></a>
        </div>

        <div class="logo-icon text-center">
            <a href="backPage.html"><img src="images/logo_icon.png" alt=""></a>
        </div>
        <!--logo and iconic logo end-->

        <div class="left-side-inner">


            <!--sidebar nav start-->
            <ul class="nav nav-pills nav-stacked custom-nav">
                <li class="menu-list nav-active"><a href=""><i class="fa fa-home"></i>
                    <span>用户</span></a>
                    <ul class="sub-menu-list">
                        <li><a href="/back/userList"> 用户列表</a></li>
                        <li><a href="/back/userType"> 用户权限</a></li>
                    </ul>
                </li>

                <li class="menu-list nav-active"><a href=""><i class="fa fa-laptop"></i>
                    <span>商品</span></a>
                    <ul class="sub-menu-list">
                        <li><a href="/back/product"> 商品列表</a></li>
                        <li><a href="/back/addPage"> 新商品</a></li>
                    </ul>
                </li>
                <li class="menu-list nav-active"><a href=""><i class="fa fa-laptop"></i>
                    <span>订单</span></a>
                    <ul class="sub-menu-list">
                        <li><a href="/back/ordersList"> 订单列表</a></li>
                    </ul>
                </li>
            </ul>
            <!--sidebar nav end-->

        </div>
    </div>
    <!-- left side end-->

    <!-- main content start-->
    <div class="main-content">

        <!-- header section start-->
        <div class="header-section">

            <!--toggle button start-->
            <a class="toggle-btn"><i class="fa fa-bars"></i></a>
            <!--toggle button end-->


            <!--notification menu start -->
            <div class="menu-right">
                <ul class="notification-menu">

                    <li>
                        <a href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                            <img th:src="'/images/touxiang/'+${session.user.fileName}" alt=""/>
                            [[${session.user.userName}]]
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu dropdown-menu-usermenu pull-right">
                            <li><a href="/"><i class="fa fa-sign-out"></i> Log Out</a></li>
                        </ul>
                    </li>

                </ul>
            </div>
            <!--notification menu end -->

        </div>
        <!-- header section end-->


        <!--body wrapper start-->
        <section class="wrapper">
            <!-- page start-->

            <div class="row" style="margin-left: 250px;">
                <div class="col-lg-6">
                    <section class="panel">
                        <header class="panel-heading">
                            商品修改
                        </header>
                        <div class="panel-body">
                            <form role="form" action="/back/updateById" method="post" enctype="multipart/form-data">
                                <div class="form-group">

                                    <label for="exampleInputName">商品名称</label>
                                    <input type="text" class="form-control" id="exampleInputName"
                                           name="name" th:value="${product.name}">
                                    <input name="pn" type="hidden" th:value="${pn}">
                                    <input name="id" type="hidden" th:value="${product.id}">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPrice">商品单价</label>
                                    <input type="text" class="form-control" id="exampleInputPrice"
                                           name="price" th:value="${product.price}">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputFile">商品图片</label>
                                    <input type="file" name="productImg" id="exampleInputFile">
                                    <input type="hidden" name="fileName" th:value="${product.fileName}">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputIntegral">商品积分</label>
                                    <input type="text" class="form-control" name="integral"
                                           id="exampleInputIntegral" th:value="${product.integral}">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputStock">商品库存</label>
                                    <input type="text" class="form-control" name="stock"
                                           id="exampleInputStock" th:value="${product.stock}">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputStockCategoryleveloneId">类别编号</label>
                                    <select id="exampleInputStockCategoryleveloneId" class="form-control"
                                            name="categoryleveloneId">
                                        <option value="548" th:selected="${product.categoryleveloneId == 548}">化妆品
                                        </option>
                                        <option value="628" th:selected="${product.categoryleveloneId == 628}">家用商品
                                        </option>
                                        <option value="660" th:selected="${product.categoryleveloneId == 660}">进口食品
                                        </option>
                                        <option value="670" th:selected="${product.categoryleveloneId == 670}">电子商品
                                        </option>
                                        <option value="676" th:selected="${product.categoryleveloneId == 676}">保健食品
                                        </option>
                                        <option value="681" th:selected="${product.categoryleveloneId == 681}">箱包
                                        </option>
                                        <option value="0" th:selected="${product.categoryleveloneId == 0}">积分商品</option>
                                    </select>
                                </div>
                                <button type="submit" class="btn btn-primary" style="margin-left: 150px">Submit</button>
                            </form>
                        </div>
                    </section>
                </div>
            </div>
        </section>

    </div>
    <!-- main content end-->
</section>

<!-- Placed js at the end of the document so the pages load faster -->
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="js/jquery-migrate-1.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/modernizr.min.js"></script>
<script src="js/jquery.nicescroll.js"></script>

<!--common scripts for all pages-->
<script src="js/scripts.js"></script>

</body>
</html>
